Easily: Practical Machine Learning Algorithms with Python by Thomas Darrin

Easily: Practical Machine Learning Algorithms with Python by Thomas Darrin

Author:Thomas, Darrin [Thomas, Darrin]
Language: eng
Format: epub
Publisher: SuJinSoLa
Published: 2020-03-30T16:00:00+00:00


The MSE is slightly higher than the previous model. There’s little difference. For the test data, we will use the first model with the linear kernel.

Model Testing

The code below shows the performance of the first model with the test data. First we make the predictions and calculate the correlation.

y_pred=h1.predict(X_test)

np.corrcoef(y_pred,y_test)

0.40

The correlation is actually a little better than the training data. Below is the scatterplot for visualization purposes.

Lastly, here is the MSE

round(mean_squared_error(y_test, y_pred),5)

0.01832

The MSE is almost the same. It appears that this model would generalize to other data.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.